package com.tool.btn;

import com.tool.tcpimg.UIUtils;
import org.come.Frame.ImpactGradeJframe;
import org.come.Jpanel.ImpactGradeGoodsJpanel;

import java.awt.*;
import java.awt.event.MouseEvent;

public class ImpactGradeGoodsBtn extends MoBanBtn {
    private int caozuo;

    private ImpactGradeGoodsJpanel impactGradeGoodsJpanel;

    private int i = 0;

    public ImpactGradeGoodsBtn(String iconpath, int type, int caozuo, String text, ImpactGradeGoodsJpanel impactGradeGoodsJpanel) {
        super(iconpath, type);
        this.setText(text);
        this.setFont(UIUtils.TEXT_FONT1);
        this.setForeground(Color.yellow);
        this.setVerticalTextPosition(0);
        this.setHorizontalTextPosition(0);
        this.impactGradeGoodsJpanel = impactGradeGoodsJpanel;
        this.caozuo =caozuo;
    }


    public void chooseyes() {
    }

    public void chooseno() {
    }

    public void nochoose(MouseEvent e) {
        if(ImpactGradeJframe.getImpactGradeJframe().getImpactGradeJpanel().getTypeMenu() == 4)
             impactGradeGoodsJpanel.refreshItem(caozuo);
        else
            impactGradeGoodsJpanel.refreshItem1(caozuo);
    }

    public int getI() {
        return i;
    }

    public void setI(int i) {
        this.i = i;
    }
}
